Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow for specifying a custom width for the profile popup #242

Merged

Conversation

jimmyhogoboom
Copy link
Contributor

@jimmyhogoboom jimmyhogoboom commented Nov 25, 2024

🐛 Issue

Closes #233

The profile popup width is based on the viewport width by default, and is absolutely positioned so its width isn't controlled by its container.

✏️ Solution

Implement a new data prop data-search-profile-size which takes a CSS width string, allowing the consumer to specify whatever width they need.

Also nudge the popup to the right 15px to align it with the search bar.

🔬 To Test

I haven't been able to reproduce this locally, only was able to test by directly editing the source in the browser to apply the styling changes.

📸 Screenshots

With data-search-profile-size set to 365px:
Screenshot 2024-11-25 at 9 57 37 AM

Copy link

linear bot commented Nov 25, 2024

Copy link

vercel bot commented Nov 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
apollos-micro-service ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 25, 2024 5:06pm
apollos-web-embeds ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 25, 2024 5:06pm

@redreceipt
Copy link
Member

Have you talked to Josh about this solution? If I understand correctly, he'll have to set this on every single customer site?

@redreceipt
Copy link
Member

Follow up question, can we set a sane default that can be overridden if necessary?

@jimmyhogoboom
Copy link
Contributor Author

@redreceipt I have not, I can reach out to him. He should only have to set this in places where the current pop-up doesn't fit, so it will depend on the specific use cases.

Regarding a default to override, I think that's what we have in this PR. The existing behavior would be the default, and setting this new data-search-profile-size attribute would be the override.

@redreceipt
Copy link
Member

Got it! Ok we'll merge this and I'll make sure he knows to set this variable if he needs it.

@redreceipt redreceipt added this pull request to the merge queue Nov 26, 2024
Merged via the queue into main with commit 5a41e7c Nov 26, 2024
7 checks passed
@redreceipt redreceipt deleted the apo-1017-seacoast-web-alignment-on-search-pop-out-is-off branch November 26, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

search modal alignment is off
2 participants